/*********************************************************
          File Name:delete.cpp
          Author: Abby Cin
          Mail: abbytsing@gmail.com
          Created Time: Wed 16 Sep 2015 09:54:12 PM CST
**********************************************************/

#include <iostream>

class T
{
        private:
                int *n;
        public:
                T(): n(new int(1)) {};
                T(T &t) = delete;
                ~T() = delete; // memory leak
};

int main()
{
        //T t; wrong `clang: error: attempt to use a deleted funtion`
        
        T *t = new T();

        //T m(*t); `clang: error: call to deleted constructor of 'T'`

        //delete t; wrong `clang: error: attempt to use a deleted funtion`
}
